home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 192 / 192.d81 / telnyr 2 (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  26KB  |  864 lines

  1. 0 dv=peek(186):if gg=1 then 12
  2. 1 if gg=2 then 14
  3. 2 if gg=3 then 16
  4. 3 if gg=4 then 18
  5. 4 if gg=5 then 29
  6. 5 if gg=6 then 2043
  7. 6 if gg=7 then 2152
  8. 7 if gg=8 then 9540
  9. 8 if gg=9 then 9580
  10. 9 if gg=10then6950
  11. 10 gosub50000:print"[147]":poke53281,0:poke53280,0
  12. 11 gg=1:load"51200",dv,1
  13. 12 gg=2:load"main2",dv,1
  14. 14 gg=3:load"elfspr",dv,1
  15. 16 gg=4:load"7spr",dv,1
  16. 18 gg=5:load"sfx1280",dv,1
  17. 23 poke53210,c:sys53200:return
  18. 24 poke781,yt:poke782,xt:poke783,0:sys65520:return
  19. 25 fork=1to1200:next:return
  20. 26 print"[147]":print"not enough gold!":gosub25:return
  21. 27 poke198,0:wait198,1:geta$:return
  22. 28 sa=29000+(sn*960):ea=sa+958:ns=50176:gosub5010:return
  23. 29 gosub8500
  24. 32 v=53248:pokev+21,0:pokev+16,0
  25. 33 sa=39240:ea=sa+63:ns=49152:gosub5010
  26. 41 poke51192,0:poke51193,1:forp=51194to51199:pokep,2:next
  27. 44 poke53270,peek(53270)or16
  28. 46 poke53282,8:poke53283,6
  29. 47 c=13:gosub23
  30. 52 poke53276,255:poke53285,3:poke53286,7
  31. 60 poke v+39,8
  32. 74 sn=3:gosub4000:pokev,188:pokev+1,120:pokev+21,1
  33. 76 cx=21:cy=9:co=50176:u=646:eg=0
  34. 78 fd=40:g=100:wp$="crummy bow":wp=4:zb=0:zc=0:zh=0:zs=0:dg=0:zt=0:zk=0:zr=0
  35. 79 n$="nova":hp=250:gk=0:pt=0:bk=0
  36. 700 rem*js*
  37. 701 x=8:jy=56320:tn=45
  38. 702 ifpeek(56320)<>127thentm=tm+1:iftm=tnthentm=0:goto20000
  39. 703 fb=peek(jy)and16
  40. 704 js=15-(peek(jy)and15)
  41. 706 if js=1 then720:remu
  42. 707 if js=2 then740:remd
  43. 708 if js=4 then760:reml
  44. 711 if js=8 then780:remr
  45. 712 if fb=0 then goto6000
  46. 713 ifpeek(197)=60thengoto10000
  47. 716 goto702
  48. 718 rem
  49. 719 rem*u
  50. 720 ifpeek(v+1)<>56then724
  51. 721 sn=sn-1
  52. 722 gosub4000:goto702
  53. 724 goto900
  54. 725 poke v+1,peek(v+1)-x
  55. 726 cy=cy-1
  56. 728 gosub1000:goto702
  57. 739 rem*d
  58. 740 ifpeek(v+1)=216 thensn=sn+1:gosub4100:goto702
  59. 744 goto910
  60. 745 poke v+1,peek(v+1)+x
  61. 746 cy=cy+1
  62. 747 ifdg=1ordg=3thengosub1000:goto702
  63. 748 gosub1100:goto702
  64. 759 rem*l
  65. 760 ifpeek(v)=28and ms=0thensn=sn-2:gosub4200:goto702
  66. 765 if peek(v)=4and ms=1 then820
  67. 768 goto920
  68. 770 poke v,peek(v)-x
  69. 772 remch=ch-1:ifch<0thench=1
  70. 773 cx=cx-1
  71. 774 gosub1200:goto702
  72. 779 rem*r
  73. 780 ifpeek(v)=252andms=0 then 800
  74. 783 ifpeek(v)=60andms=1 thensn=sn+2::gosub4300:goto702
  75. 785 goto930
  76. 786 poke v,peek(v)+x
  77. 787 cx=cx+1
  78. 788 gosub1300:goto702
  79. 799 rem*msb
  80. 800 rem
  81. 801 goto950
  82. 802 poke v+16,1:pokev,4:ms=1
  83. 804 cx=cx+1
  84. 806 goto702
  85. 820 goto940
  86. 821 pokev+16,0:pokev,252:ms=0
  87. 824 ch=ch-1:ifch<0thench=1
  88. 825 cx=cx-1
  89. 826 goto702
  90. 898 co=50176+cx+(cy*40):return
  91. 900 gosub898:ifpeek(co-40)<103orpeek(co-39)<103then702:remu
  92. 902 goto725
  93. 910 gosub898:ifpeek(co+80)<103orpeek(co+81)<103then702:remd
  94. 912 goto745
  95. 920 gosub898:ifpeek(co-1)<103orpeek(co+39)<103then702:reml
  96. 922 goto770
  97. 930 gosub898:ifpeek(co+2)<103orpeek(co+42)<103then702:remrmsb
  98. 932 goto786
  99. 940 gosub898:ifpeek(co-1)<103orpeek(co+39)<103then702:remlmsb
  100. 942 goto821
  101. 950 gosub898:ifpeek(co+2)<103orpeek(co+42)<103then702:remrmsb
  102. 952 goto802
  103. 1000 ns=49152:su=su+1:ifsu=4thensu=0:remu
  104. 1004 ifsu=0thencm=153:sa=39240:goto1020
  105. 1006 ifsu=1thencm=155:sa=39752:goto1020
  106. 1008 ifsu=2thencm=153:sa=39240:goto1020
  107. 1010 ifsu=3thencm=157:sa=40264:goto1020
  108. 1020 xm=0:ym=64:bm=0:am=192:dm=72:gosub5050:return
  109. 1100 ns=49152:sd=sd+1:ifsd=4thensd=0:remd
  110. 1104 ifsd=0thencm=154:sa=39496:goto1120
  111. 1106 ifsd=1thencm=156:sa=40008:goto1120
  112. 1108 ifsd=2thencm=154:sa=39496:goto1120
  113. 1110 ifsd=3thencm=158:sa=40520:goto1120
  114. 1120 xm=0:ym=64:bm=0:am=192:dm=72:gosub5050:return
  115. 1200 ns=49152:sl=sl+1:ifsl=4thensl=0:reml
  116. 1204 ifsl=0thencm=154:sa=39624:goto1220
  117. 1206 ifsl=1thencm=156:sa=40136:goto1220
  118. 1208 ifsl=2thencm=154:sa=39624:goto1220
  119. 1210 ifsl=3thencm=158:sa=40648:goto1220
  120. 1220 xm=0:ym=64:bm=0:am=192:dm=200:gosub5050:return
  121. 1300 ns=49152:sr=sr+1:ifsr=4thensr=0:remr
  122. 1304 ifsr=0thencm=153:sa=39368:goto1220
  123. 1306 ifsr=1thencm=155:sa=39880:goto1220
  124. 1308 ifsr=2thencm=153:sa=39368:goto1220
  125. 1310 ifsr=3thencm=157:sa=40392:goto1220
  126. 1320 xm=0:ym=64:bm=0:am=192:dm=200:gosub5050:return
  127. 1400 ea=sa+64:poke 781,xm+1:poke782,ym
  128. 1402 poke 88,bm+1:poke 89,am
  129. 1404 poke90,dm+1:poke 91,cm
  130. 1406 sys41964:poke ns,peek(sa)
  131. 2000 goto2800
  132. 2040 print"[147]":print"travelling to south island":print:print:print
  133. 2041 print"loading..":xm=0:ym=64:bm=0:am=192:dm=200:cm=157:sa=39496:gosub5050
  134. 2042 gg=6:load"st9",dv,1
  135. 2043 pokev+21,0:sa=29000:ea=sa+958:ns=50176:gosub5010:gosub2044:goto2045
  136. 2044 poke53282,15:poke53283,6:c=13:gosub23:poke37555,139:return:remerr
  137. 2045 pokev+16,0:ms=0
  138. 2046 pokev,220:pokev+1,128:pokev+21,1:cy=10:cx=25:dg=2:sn=0
  139. 2047 p=30001:gosub2048:p=30038:gosub2048:p=30961:gosub2048:goto702:remerr
  140. 2048 fork=1to24:pokep,73:p=p+40:next:return
  141. 2100 ifdg=5then3000
  142. 2102 ifsn=0andpeek(v)=220andpeek(v+1)>96andpeek(v+1)<120then2106
  143. 2104 goto2200
  144. 2106 print"[147]":pokev+21,0:poke646,3:print"south island ferries":print:print
  145. 2110 print"catch ferry to mainland ?  y/n":print:print:print
  146. 2112 poke198,0:wait198,1:geta$
  147. 2114 ifa$="n"then2120
  148. 2116 ifa$="y"then2150
  149. 2118 goto2112
  150. 2120 sa=29000:ea=sa+958:ns=50176:gosub5010:c=13:gosub23:pokev+21,1:goto702
  151. 2130 dg=2:sn=3:print"[147]":sys1321:sys1506:poke53282,15:poke53283,6:c=13:gosub23
  152. 2132 cn=1:wp=wq:cs=0:dx=0:iv=0: poke53285,3:poke53286,7:pokev+16,0:ms=0
  153. 2143 xm=0:ym=64:bm=0:am=192:dm=72:cm=154:sa=39496:gosub5050
  154. 2144 pokev+21,0:pokev+39,8:poke53285,3:poke53286,7
  155. 2145 gosub28
  156. 2146 pokev,108:pokev+1,168:pokev+21,1:cx=11:cy=15:goto702
  157. 2150 print:print:print"loading.."
  158. 2151 gg=7:load"main2",dv,1
  159. 2152 print"[147]":c=13:gosub23
  160. 2153 sn=3:dg=0:poke53282,8:poke53283,6:pokev,188:pokev+1,120:cx=21:cy=9
  161. 2154 gosub28:pokev+16,0:ms=0:pokev+21,1
  162. 2156 goto702
  163. 2200 ifsn=3andpeek(v)=228andpeek(v+1)>176andpeek(v+1)<200then2206
  164. 2201 goto2400
  165. 2202 k=50176:forp=ktok+39:pokep,j:next:forp=k+960tok+999:pokep,j:next
  166. 2203 forp=1to24:pokek,j:k=k+40:next:k=50215:forp=1to24:pokek,j:k=k+40:next
  167. 2204 return
  168. 2206 poke53265,peek(53265)and239
  169. 2207 v=53248:pokev+21,0:poke646,3:print"[147]":j=113:gosub2202
  170. 2210 poke646,4:print:print:printtab(7)"telnyr south magick shoppe  "
  171. 2216 p=10: print:print:print:pokeu,5
  172. 2218 print:printtab(p)"a. teleport  80 gold"
  173. 2220 print:printtab(p)"b. revive    100 gold"
  174. 2222 print:printtab(p)"c. kill      100 gold"
  175. 2223 print:printtab(p)"d. banish    200 gold"
  176. 2224 print:printtab(p)"x. exit shop"
  177. 2226 pokeu,2:print:print:print:printtab(2)"choose a-d or x";
  178. 2228 print"   you have";:printg;:print" gold"
  179. 2232 poke53265,peek(53265)or16
  180. 2234 gosub27
  181. 2236 ifa$<>"a"then2242
  182. 2238 g=g-80:ifg<0theng=g+80:goto2300
  183. 2239 zt=zt+1:print"[147]":print"teleport to safety !":gosub25:goto2206
  184. 2240 rem
  185. 2242 ifa$<>"d"then2246
  186. 2243 g=g-200:ifg<0theng=g+200:goto2300
  187. 2244 zb=zb+1:print"[147]":print"banish all foes":gosub25:goto2206
  188. 2246 ifa$<>"c"then2250
  189. 2247 g=g-100:ifg<0theng=g+100:goto2300
  190. 2248 zk=zk+1:print"[147]":print"kills one monster":gosub25:goto2206
  191. 2250 ifa$<>"b"then2260
  192. 2251 g=g-100:ifg<0theng=g+100:goto2300
  193. 2252 zr=zr+1:print"[147]":print"heals +100":gosub25:goto2206
  194. 2260 ifa$<>"x"then2264
  195. 2262 goto2280
  196. 2264 ifa$<>" "then2234
  197. 2266 om=4:goto10000
  198. 2280 print"[147]":c=13:gosub23
  199. 2284 gosub28:pokev+21,1:goto702
  200. 2290 goto702
  201. 2300 gosub26:goto2206
  202. 2400 ifsn=3andpeek(v)=108andpeek(v+1)>144andpeek(v+1)<176then2500
  203. 2402 goto702
  204. 2500 xm=0:ym=64:bm=0:am=192:dm=200:cm=157:sa=40392:gosub5050
  205. 2508 print"[147]":poke53282,14:poke53283,6:c=15:gosub23:v=53248
  206. 2509 pokev+21,0:sa=34760:ea=sa+958:ns=50176:gosub5010
  207. 2510 pokev,76:pokev+1,112:pokev+21,1:cy=8:cx=7:dg=3:sn=6:goto702
  208. 2800 rem
  209. 2802 print"[147]":poke53269,0
  210. 2804 pokeu,5:print"telnyr ferry terminal":print:print:pokeu,7
  211. 2809 print:print"price includes return journey"
  212. 2810 pokeu,3:print:print:print:print"a  eastern islands   50 gold"
  213. 2812 print:print"b  southern island   200 gold""
  214. 2814 [153]:[153]"c  nowhere ":[153]
  215. 2816 [151]u,7:[153]:[153]:[153]"choose a-c"
  216. 2817 [151]u,2:[153]:[153]"you have ";:[153]g;:[153]" gold"
  217. 2818 [141]27
  218. 2820 [139]a$[178]"a"[167]2850
  219. 2824 [139]a$[178]"b"[167]2870
  220. 2826 [139]a$[178]"c"[167]6304
  221. 2828 [137]2818
  222. 2850 g[178]g[171]50:[139]g[179]0[167]g[178]g[170]50:[141]26:[137]6304
  223. 2852 [137]2900
  224. 2870 g[178]g[171]200:[139]g[179]0[167]g[178]g[170]200:[141]26:[137]6304
  225. 2872 [137]2040
  226. 2900 [143]*e
  227. 2902 [153]"load":[153]"travelling...":[141]25:[141]25
  228. 2903 [153]"load"
  229. 2904 xm[178]0:ym[178]64:bm[178]0:am[178]192:dm[178]200:cm[178]154:sa[178]39624:[141]5050
  230. 2905 [151]53282,12:[151]53283,6:c[178]11:[141]23
  231. 2906 sa[178]36680:ea[178]sa[170]958:ns[178]50176:[141]5010:[141]2907:[137